import { USER_INFO } from '../constant/cacheKeys'
import { getCache } from '../utils/cache'

export async function getToken () {
  const data = await getCache(USER_INFO)
  if (data && data.token) {
    return data.token
  } else {
    return null
  }
}